Skip to content

fix(win-app): check the mux slot generation and take the outcome under one lock - #331

Merged
2witstudios merged 1 commit into
mainfrom
claude/cool-tesla-y1b8gf
Nov 30, 2026
Merged

2witstudios merged 1 commit into
mainfrom
claude/cool-tesla-y1b8gf

Conversation

@2witstudios

Copy link
Copy Markdown
Owner

Why

Follow-up to #327. #327 merged at 20a64a98, before this last review fix was pushed to its branch, so this one commit isn't on main yet.

CodeRabbit's follow-up on apps/purepoint-windows/src-tauri/src/daemon/mux.rs: a waiter checked the slot's generation, released the lock, and then took the outcome. A concurrent reset could land in between and hand it a result from an older generation.

Change

  • 36bb25a8: the generation check and taking the outcome now happen under the same lock. A test resets the slot right after the check.
  • A client that is used after a later reset still fails on channel open and is retried once, so the window that remains recovers on its own.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QyQdJ2REppCunF9PidNt3K

A reset could still fall between a waiter's generation check and its
taking the outcome. Both now happen while the slot's lock is held, so a
reset either precedes them (the waiter gets the stale-attempt error) or
follows the return, when it has closed the session: the caller's channel
open then fails as SessionClosed, the connector retries once, and the
retry makes a fresh attempt. A test covers that last path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QyQdJ2REppCunF9PidNt3K
@coderabbitai

coderabbitai Bot commented Nov 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 6 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 84a0b2c7-9c60-47fd-9de6-9815d95b4c72
Commits

Reviewing files that changed from the base of the PR and between f481bb2 and 36bb25a.

Files selected for processing: 1

  • apps/purepoint-windows/src-tauri/src/daemon/mux.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-30T21:28:39.262741Z 36bb25a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@2witstudios
2witstudios merged commit 5020418 into main Nov 30, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant